package ex.com.jm.food.service.impl;

import java.util.List;

import ex.com.jm.food.dao.CompanyCommentDao;
import ex.com.jm.food.entity.Comment;
import ex.com.jm.food.service.CompanyCommentService;

public class CompanyCommentServiceImpl implements CompanyCommentService {

	private CompanyCommentDao companyCommentDao;
	
	public CompanyCommentDao getCompanyCommentDao() {
		return companyCommentDao;
	}

	public void setCompanyCommentDao(CompanyCommentDao companyCommentDao) {
		this.companyCommentDao = companyCommentDao;
	}

	@Override
	public List<Comment> getComments(int initPage, int pageRow, String comId,
			String userName, String s_date, String e_date, String order,
			String sort) {
		// TODO Auto-generated method stub
		return this.getCompanyCommentDao().getComments(initPage, pageRow, comId, userName, s_date, e_date, order, sort);
	}

	@Override
	public int commentCount(String comId, String userName, String s_date,
			String e_date) {
		// TODO Auto-generated method stub
		return this.getCompanyCommentDao().commentCount(comId, userName, s_date, e_date);
	}

	@Override
	public Comment editComment(String cmentId) {
		// TODO Auto-generated method stub
		return this.getCompanyCommentDao().editComment(cmentId);
	}

	@Override
	public boolean updateComment(String cmentId, String repment, String repDate) {
		// TODO Auto-generated method stub
		return this.getCompanyCommentDao().updateComment(cmentId, repment, repDate);
	}

}
